package ua.kpi_java_training.evgeniygusar.module3;

import java.util.Random;

public class Ostrich extends InhabitantOfTheDesert {

    /**
     * Move of Ostrich to the random destination
     */
    public void Moving() {
        Destination d = getRandomDestination();
        //System.out.println(d);
        Move(d);
    }

    /**
     * Random destination for ostrich function Moving()
     */
    public Destination getRandomDestination() {

        Random rnd = new Random(System.currentTimeMillis());
        int numOfVictimDestination = rnd.nextInt(6);
        Destination victimDestination = Destination.values()[numOfVictimDestination];
        return victimDestination;
    }
}

